package com.bitdf.txing.chat.feign;

import com.bitdf.txing.chat.config.FeignInterceptor;
import com.bitdf.txing.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;
import java.util.Set;

/**
 * @author Lizhiwei
 * @date 2023/2/3 17:18:59
 * 注释：
 */
@FeignClient(
        name = "tx-search",                 // 服务名称
        configuration = FeignInterceptor.class       // 请求拦截器 （关键代码）
)
public interface ChatSearchFeignService {
    @GetMapping("/txing/search/group/is")
    R isGroupId(@RequestParam("groupId") Long groupId);

    @PostMapping("/txing/search/group/simple/get")
    R getGroupSimpleByGroupIds(@RequestBody Set<Long> groupIds) throws IOException;

    @GetMapping("/txing/search/group/count/modify/increOrDcre")
    public R groupInfoIncreOrDcre(@RequestParam("groupId") Long groupId,@RequestParam("opsValue") Integer opsValue,@RequestParam("target") String target) throws IOException;

    @GetMapping("/txing/search/group/get/{id}")
    public R getGroupInfoById(@PathVariable("id") Long id) throws IOException;
}
